package com.study.dao;

import com.study.model.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface UserDao {

    @Insert("insert into mq_user(id,name) values (#{id}, #{name})")
    void insert(User u);

    @Update("update mq_user set name=#{name} where id =#{id}")
    void update(User u);

    @Delete("delete from mq_user where id =#{id}")
    void delete(String id);

    @Select("select * FROM mq_user where id = #{id}")
    User find(String id);

}
